package com.soap.client;

import java.net.MalformedURLException;
import java.net.URL;
import java.rmi.RemoteException;

import org.apache.axis.AxisFault;

import cn.com.tech_trans.www.CRM_VIP_ProxyLocator;
import cn.com.tech_trans.www.CRM_VIP_ProxySoapStub;
import cn.com.tech_trans.www.ResponseDataOfBasicInfo;

/**
 *	客户端测试代码
 * @author Roger
 */
public class ClientTestGetBasicInfo {

	public static void main(String[] args) throws Exception {

		try {
			// 服务端Service
			CRM_VIP_ProxyLocator service = new CRM_VIP_ProxyLocator();
			// 服务端web service 的wsdl地址
			URL endpointURL = new URL("http://58.42.235.140:1999/CRM_VIP_Proxy.asmx?WSDL");
			// 通过wsdl地址与service获取Proxy
			CRM_VIP_ProxySoapStub stub = new CRM_VIP_ProxySoapStub(endpointURL,
					service);
			// 调用接口
			ResponseDataOfBasicInfo basicInfo = stub.getBasicInfo();
			
			// 响应信息
			System.out.println(basicInfo);
			
		} catch (AxisFault e) {
			e.printStackTrace();
		} catch (MalformedURLException e) {
			e.printStackTrace();
		} catch (RemoteException e) {
			e.printStackTrace();
		}

	}
}
